package com.meilai.project.vo.business.sale;

import com.meilai.project.entity.business.sale.BillSale;
import com.meilai.project.vo.business.contract.ContractMediaCountDTO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.math.BigDecimal;
import java.time.LocalDate;
import java.util.ArrayList;
import java.util.List;

/**
 * @author xchen
 * @since 2022-01-20
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@ApiModel
public class SaleBillVO extends BillSale {
    @ApiModelProperty(value = "当前人是否可以审核")
    private Boolean can_check;

    @ApiModelProperty(value = "当前人是否为提交人")
    private Boolean is_applier;

    @ApiModelProperty(value = "合同名称（甲方抬头）")
    private String contractName;

    @ApiModelProperty(value = "合同金额")
    private BigDecimal contractAmount;

    @ApiModelProperty(value = "客户id")
    private Long customerId;

    @ApiModelProperty(value = "合同开始时间")
    private LocalDate contractBeginDate;

    @ApiModelProperty(value = "合同结束时间")
    private LocalDate contractEndDate;

    @ApiModelProperty(value = "项目名称(客户名称)")
    private String customerName;

    @ApiModelProperty(value = "分公司名称")
    private String deptName;

    @ApiModelProperty("合同金额(优惠价格)")
    private BigDecimal discounted_price;

    @ApiModelProperty("自营情况明细-销售单已保存")
    private List<BillSaleMediaDetailVO> mediaDetailList;

    @ApiModelProperty("代理情况明细-关联的合同")
    private List<BillSaleProxyMediaDetailVO> proxyMediaDetailList;

    @ApiModelProperty("当前人是否可修改计提百分比")
    private Boolean update_accrued_amount;

    @ApiModelProperty("是否是老版本数据")
    private Boolean is_old_data = false;

    @ApiModelProperty("方案名称")
    private String planName;

    @ApiModelProperty("销售单关联客户是否是公司客户")
    private Boolean is_company_customer = false;

    // 组别名称
    @ApiModelProperty("组别id")
    private Long groupId;

    @ApiModelProperty("组别名称")
    private String groupName;

    @ApiModelProperty("组别发票，销售是否已收到")
    private Boolean groupInvoiceReceived;

    @ApiModelProperty("资源类型")
    private String mediaTypeName;

    @ApiModelProperty("针对已变更的销售单，该属性指向最新销售单")
    private Long newestId;

    @ApiModelProperty("针对已变更的销售单，该属性指向原始的销售单")
    private List<SaleBillVO> originList;

    @ApiModelProperty("锁定资源")
    private List<ContractMediaCountDTO> mediaCountList = new ArrayList<>();

    @ApiModelProperty("关联市场单ID")
    private Long marketId;
}
